#ifndef DASHBOARD_H
#define DASHBOARD_H

#include <QWidget>
#include <QLabel>
#include <QChartView>
#include "widgets/displayframe.h"
#include "widgets/progressbarwidget.h"
#include <QPushButton>

class DashBoard : public QWidget
{
    Q_OBJECT

public:
    explicit DashBoard(TomatoClockButton * clock,QWidget *parent = nullptr);

protected:
    void closeEvent(QCloseEvent *event) override; // 重写关闭事件
    
public slots:
    void updateChart(); // 槽函数声明

private slots:
    void on_playPauseButton_clicked();

private:
    void createChart(QtCharts::QChartView *chartView);
    DisplayFrame *framesData[2];
    void initUI();
    void initData();
    void initDisplayData();
    void createAudio();
    QLabel *label;
    TomatoClockButton * clock;

};

#endif // DASHBOARD_H